home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1995 March / Macworld CD-ROM (March 1995).cdr / Updaters / Symantec C++ 6.0.1 Update / Library Updates / Mac #includes / Apple #includes / QDOffscreen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-18  |  4.2 KB  |  144 lines  |  [TEXT/KAHL]

  1. /************************************************************
  2.  
  3. Created: Sunday, January 6, 1991 at 9:42 PM
  4.     QDOffscreen.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.         Copyright Apple Computer, Inc.    1985-1990
  9.         All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __QDOFFSCREEN__
  15. #define __QDOFFSCREEN__
  16.  
  17. #ifndef __QUICKDRAW__
  18. #include <Quickdraw.h>
  19. #endif
  20.  
  21.  
  22. enum {
  23.  
  24.  
  25. /* New error codes */
  26.     cDepthErr = -157    /*invalid pixel depth*/
  27. };
  28.  
  29. enum {
  30.     pixPurgeBit = 0,
  31.     noNewDeviceBit = 1,
  32.     useTempMemBit = 2,
  33.     keepLocalBit = 3,
  34.     pixelsPurgeableBit = 6,
  35.     pixelsLockedBit = 7,
  36.     mapPixBit = 16,
  37.     newDepthBit = 17,
  38.     alignPixBit = 18,
  39.     newRowBytesBit = 19,
  40.     reallocPixBit = 20,
  41.     clipPixBit = 28,
  42.     stretchPixBit = 29,
  43.     ditherPixBit = 30,
  44.     gwFlagErrBit = 31
  45.     };
  46.  
  47. enum {
  48.     pixPurge = 1 << pixPurgeBit,
  49.     noNewDevice = 1 << noNewDeviceBit,
  50.     useTempMem = 1 << useTempMemBit,
  51.     keepLocal = 1 << keepLocalBit,
  52.     pixelsPurgeable = 1 << pixelsPurgeableBit,
  53.     pixelsLocked = 1 << pixelsLockedBit,
  54. #if THINK_C
  55.     mapPix = 1L << mapPixBit,
  56.     newDepth = 1L << newDepthBit,
  57.     alignPix = 1L << alignPixBit,
  58.     newRowBytes = 1L << newRowBytesBit,
  59.     reallocPix = 1L << reallocPixBit,
  60.     clipPix = 1L << clipPixBit,
  61.     stretchPix = 1L << stretchPixBit,
  62.     ditherPix = 1L << ditherPixBit,
  63.     gwFlagErr = 1L << gwFlagErrBit
  64. #else
  65.     mapPix = 1 << mapPixBit,
  66.     newDepth = 1 << newDepthBit,
  67.     alignPix = 1 << alignPixBit,
  68.     newRowBytes = 1 << newRowBytesBit,
  69.     reallocPix = 1 << reallocPixBit,
  70.     clipPix = 1 << clipPixBit,
  71.     stretchPix = 1 << stretchPixBit,
  72.     ditherPix = 1 << ditherPixBit,
  73.     gwFlagErr = 1 << gwFlagErrBit
  74. #endif
  75.     };
  76.  
  77. typedef unsigned long GWorldFlags;
  78.  
  79. /* Type definition of a GWorldPtr */
  80.  
  81. typedef CGrafPtr GWorldPtr;
  82.  
  83.  
  84. #ifdef __cplusplus
  85. extern "C" {
  86. #endif
  87. pascal QDErr NewGWorld(GWorldPtr *offscreenGWorld,short PixelDepth,const Rect *boundsRect,
  88.     CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  89.     = {0x203C,0x0016,0x0000,0xAB1D}; 
  90. pascal Boolean LockPixels(PixMapHandle pm)
  91.     = {0x203C,0x0004,0x0001,0xAB1D}; 
  92. pascal void UnlockPixels(PixMapHandle pm)
  93.     = {0x203C,0x0004,0x0002,0xAB1D}; 
  94. pascal GWorldFlags UpdateGWorld(GWorldPtr *offscreenGWorld,short pixelDepth,
  95.     const Rect *boundsRect,CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  96.     = {0x203C,0x0016,0x0003,0xAB1D}; 
  97. pascal void DisposeGWorld(GWorldPtr offscreenGWorld)
  98.     = {0x203C,0x0004,0x0004,0xAB1D}; 
  99. pascal void GetGWorld(CGrafPtr *port,GDHandle *gdh)
  100.     = {0x203C,0x0008,0x0005,0xAB1D}; 
  101. pascal void SetGWorld(CGrafPtr port,GDHandle gdh)
  102.     = {0x203C,0x0008,0x0006,0xAB1D}; 
  103. pascal void CTabChanged(CTabHandle ctab)
  104.     = {0x203C,0x0004,0x0007,0xAB1D}; 
  105. pascal void PixPatChanged(PixPatHandle ppat)
  106.     = {0x203C,0x0004,0x0008,0xAB1D}; 
  107. pascal void PortChanged(GrafPtr port)
  108.     = {0x203C,0x0004,0x0009,0xAB1D}; 
  109. pascal void GDeviceChanged(GDHandle gdh)
  110.     = {0x203C,0x0004,0x000A,0xAB1D}; 
  111. pascal void AllowPurgePixels(PixMapHandle pm)
  112.     = {0x203C,0x0004,0x000B,0xAB1D}; 
  113. pascal void NoPurgePixels(PixMapHandle pm)
  114.     = {0x203C,0x0004,0x000C,0xAB1D}; 
  115. pascal GWorldFlags GetPixelsState(PixMapHandle pm)
  116.     = {0x203C,0x0004,0x000D,0xAB1D}; 
  117. pascal void SetPixelsState(PixMapHandle pm,GWorldFlags state)
  118.     = {0x203C,0x0008,0x000E,0xAB1D}; 
  119. pascal Ptr GetPixBaseAddr(PixMapHandle pm)
  120.     = {0x203C,0x0004,0x000F,0xAB1D}; 
  121. pascal QDErr NewScreenBuffer(const Rect *globalRect,Boolean purgeable,GDHandle *gdh,
  122.     PixMapHandle *offscreenPixMap)
  123.     = {0x203C,0x000E,0x0010,0xAB1D}; 
  124. pascal void DisposeScreenBuffer(PixMapHandle offscreenPixMap)
  125.     = {0x203C,0x0004,0x0011,0xAB1D}; 
  126. pascal GDHandle GetGWorldDevice(GWorldPtr offscreenGWorld)
  127.     = {0x203C,0x0004,0x0012,0xAB1D}; 
  128. pascal Boolean QDDone(GrafPtr port)
  129.     = {0x203C,0x0004,0x0013,0xAB1D}; 
  130. pascal long OffscreenVersion(void)
  131.     = {0x7014,0xAB1D}; 
  132. pascal QDErr NewTempScreenBuffer(const Rect *globalRect,Boolean purgeable,
  133.     GDHandle *gdh,PixMapHandle *offscreenPixMap)
  134.     = {0x203C,0x000E,0x0015,0xAB1D}; 
  135. pascal Boolean PixMap32Bit(PixMapHandle pmHandle)
  136.     = {0x203C,0x0004,0x0016,0xAB1D}; 
  137. pascal PixMapHandle GetGWorldPixMap(GWorldPtr offscreenGWorld)
  138.     = {0x203C,0x0004,0x0017,0xAB1D}; 
  139. #ifdef __cplusplus
  140. }
  141. #endif
  142.  
  143. #endif
  144.